package com.company.J1_2;

import java.util.Scanner;

public class digui {
    public static void main(String[] args) {
        Scanner scanner =new Scanner(System.in);
        System.out.print("请输入一个整数:");
        int x =scanner.nextInt();
        System.out.println(x+"阶层为:"+dg(x));
    }
    private  static  int dg(int x){
        if(x==1) return x;
        else  return  x*dg(x-1);
    }
}
